<template>
	<view >
		<my-header bgColor="bg-gradual-blue" >
			<!-- <block slot="backText">返回</block> -->
			<block slot="content">工具箱</block>
		</my-header>
        <view class="bgHeader"></view>
        <view class="margin-top"></view>
        <block v-for="(items,i) in navList" :key="i">
            <view class="cu-bar bg-white tit">
                <view class="action">
                    <text class="cuIcon-titles text-green" ></text>
                    <text class="text-xl text-bold">{{items.name}}</text>
                </view>
            </view>
            <view class="navList row" >
                <block v-for="(item,index) in items.list" :key="index">
                    <view class="navItem col"  @click="go(item.path)">
                        <image class="icon" :src="item.icon" mode="" />
                        <view class="name">{{item.name}}</view>
                        <!-- {{item.path}} -->
                    </view>
                </block>
            </view>
        </block>
        <!-- <view class="go" @click="go('/bill/pages/app/bookkeeping/bookkeeping')">账单</view> -->
        <!-- <loading v-if="!huangli"></loading> -->
		<!-- <my-footer cur="0"></my-footer> -->
	</view>
</template>
<script>
    import router from "../router";
	export default {
		data() {
			return {
                huangli:{},
                
			}
        },
        props:{
            navList:{
                type:Array
            }
        },
		
		created(){
            console.log(router);
            // this.initData()	
            // this.go("test")
        },
		methods: {
			go(link){
               let url= router[link]
               console.log(link);
	 			if (url) {
					uni.navigateTo({
						url,
						success:(res)=>{
							console.log(res);
						},
						fail:(err)=>{
                            uni.$err(url+"不在app.json")
						}
					});
				}else{
                   uni.$err("该功能正在开发中")
				}
				
			},
			copy(data){
                uni.setClipboardData({
                    data,
                    success: function () {
                       uni.$err("请前往浏览器打开")
                    }
                });
            }
		}
	}
</script>

<style lang="scss">
	@import "../main";
</style>